<?php
/**
 * 短信验证码管理
 * Created by gii.
 * User: Gii
 * Date: 2023/02/23
 * Time: 16:16
 */

namespace app\admin\logic\system;

use app\admin\model\model\system\UserCode;

class UserCodeLogic
{
    public static function getListWithCount($where=[], $field='*', $page=1, $limit=10, $order='id desc') {
        $where = UserCode::getSelfWhereCommon($where);
        return UserCode::getListWithCountCommon($where, $field, $page, $limit, $order);
    }

    public static function getAll() {
        return UserCode::getAllCommon();
    }

    public static function del($id) {
        return UserCode::delByPkCommon($id);
    }

    public static function update($data) {
        return UserCode::updateCommon($data);
    }

    public static function add($data) {
        return UserCode::addCommon($data);
    }

    public static function getOne($id) {
        return UserCode::getLineByPkCommon($id);
    }

    public static function status($id, $status) {
        return UserCode::status($id, $status);
    }
}
